//
//  ALDBManageMacro.h
//  ios-loan-assistant
//
//  Created by hcs on 2018/9/11.
//  Copyright © 2018年 guoqingping. All rights reserved.
//

#ifndef ALDBManageMacro_h
#define ALDBManageMacro_h

#pragma mark 数据库 操作
#pragma mark -

#define kUserTableName @"User"
#define kCacheTableName @"Cache"

#define  UserTableCreate ([NSString stringWithFormat:@"CREATE TABLE %@ ('ID' INTEGER PRIMARY KEY NOT NULL, 'userId' Text, 'nickName' Text, 'userName' Text, 'mobilePhone' Text,'icon' Text,'sex' Text,'stageJsonBiao' Text,'token' Text,'timeOut' Text,'IsLogin' Inetger)",kUserTableName])

#define SearchRecordsCreate ([NSString stringWithFormat:@"CREATE TABLE %@ ('ID' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,'SearchRecord' TEXT, 'CreatedTime' TIMESTAMP DEFAULT (datetime('now','localtime')))",kSearchRecordsTableName])

#define ConfigCreate ([NSString stringWithFormat:@"CREATE TABLE %@ ('ID' INTEGER PRIMARY KEY NOT NULL,'dynSite' Text, 'imageSmallUrlPath' Text, 'imageUrlPath' Text ,'serverWeixin' Text)",kConfigTableName])

#define GuideCreate ([NSString stringWithFormat:@"CREATE TABLE %@ ('ID' INTEGER PRIMARY KEY NOT NULL,'uniqueCode' Text,'userId' Text,'deviceCode' Text,'userStage' Text,'childUserStage' Text,'fetusNum' Text,'embryoNum' Text,'pregnancyWay' Text,'lastMenses' Text,'mensesDays' Text,'menstrualCycle' Text,'dueDate' Text,'babyBirthday' Text,'birthday' Text,'age' Text,'stature' Text,'preWeight' Text,'curWeight' Text,'babySex' Text)",kGuideTableName])

#define  NoReadNewsCreate ([NSString stringWithFormat:@"CREATE TABLE %@ ('ID' INTEGER PRIMARY KEY NOT NULL,'uniqueCode' Text, 'userId' Text, 'noReadNewsCount' Text)",kNoReadNewsTableName])

#define  AlertCreate ([NSString stringWithFormat:@"CREATE TABLE %@ ('ID' INTEGER PRIMARY KEY NOT NULL, 'alertId' Text)",kAlertTableName])

#define  CacheCreate ([NSString stringWithFormat:@"CREATE TABLE %@ ('ID' INTEGER PRIMARY KEY NOT NULL,'key' Text, 'val' Text)",kCacheTableName])

#define  DefaultAddressCreate ([NSString stringWithFormat:@"CREATE TABLE %@ ('ID' INTEGER PRIMARY KEY NOT NULL,'key' Text, 'val' Text)",kDefaultAddressName])

#endif /* ALDBManageMacro_h */
